package bll

import (
	"jgt-oper/src/model"
	"jgt-oper/src/schema"
)

// EnterpriseAccount 企业金融账户
type EnterpriseAccount struct {
	EnterpriseAccountModel model.IEnterpriseAccount `inject:"IEnterpriseAccount"`
}

// AccountOpen 账户开通
func (a *EnterpriseAccount) AccountOpen(account *schema.EnterpriseFinanceAccount) error {
	return a.EnterpriseAccountModel.AccountOpen(account)
}

// AccountPay 账户充值
func (a *EnterpriseAccount) AccountPay(pay *schema.BalanceOfPayments) error {
	return a.EnterpriseAccountModel.AccountPay(pay)
}

// AccountDetail 查询企业的金融账户信息
func (a *EnterpriseAccount) AccountDetail(enterpriseID string) (*schema.EnterpriseFinanceAccount, error) {
	return a.EnterpriseAccountModel.AccountDetail(enterpriseID)
}

// AccountPaymentList 查询指定金融账户的账务记录列表
func (a *EnterpriseAccount) AccountPaymentList(enterpriseAccountID string, pageIndex, pageSize uint) ([]*schema.BalanceOfPayments, int, error) {
	return a.EnterpriseAccountModel.AccountPaymentList(enterpriseAccountID, pageIndex, pageSize)
}
